<!doctype html>
<html>

	<head>
		<meta charset="{CHARSET}">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css"/>
		<link rel="stylesheet" type="text/css" href="../media/css/dataTables.jqueryui.css"/>
		
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf- 8"></script>
		<script src="../media/js/jquery.dataTables.js" type="text/javascript" charset="utf-8"></script>
		
		
	</head>
    <style type="text/css">
    	    *{
    	    	font-family: arial;
    	    }
    	     .table {
                border: 1px solid #cad9ea;
                color: #666; text-align: center;
            }

            .table th {
                background-repeat: repeat-x;
                height: 30px;
            }

            .table td,
            .table th {
                border: 1px solid #cad9ea;
                padding: 0 1em 0; vertical-align: middle;
            }

            .table tr.alter {
                background-color: #f5fafe;
            }
            td{
            	font-size: 12px;
            }
    </style>
	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title" id="nick-title"></h1>
		</header>
		<div class="mui-content">
		    <table width="100%" class="table" id="tablevalue">
		    	<thead>
		    		<tr>
		    			
		    			<th width="30%">时间</th>
		    			<th width="30%">新昵称</th>
		    			<th width="30%">头像</th>
		    			<th width="10%">操作</th>
		    		</tr>
		    	</thead>
                <tbody>
                	<!--<tr>
                		<td><input type="checkbox" name="" id="" value="" /></td>
                		<td>2017-10-20</td>
                		<td>水电费水电费</td>
                		<td><img class="img-circle" src="../Font-Awesome-3.2.1/src/assets/img/fort_awesome.jpg" width="100%" /></td>
                	</tr>-->
                </tbody>
            
        </table>
     
		</div>
	</body>




	<script src="../js/mui.js"></script>
	<script type="text/javascript">
		mui.init();
		mui.plusReady(function() {
			function address(address) {
				return address
			};

	    var address1 = address("http://123.207.20.97");
		var ssv = plus.webview.currentWebview(); //定义一个接收数据的对象
		var title = document.getElementById("nick-title");
		title.innerText = ssv.name;  //显示标题   
		 var nichen_show1=[
				
		        {
		        	data: "create_time",
				    bSortable: false
		        },
		        {
		        	data: "nick",
				    bSortable: false
		        },
		        {
		        	data: function(obj){
		        	var imgleng = obj.head_img.length;
		        	if (imgleng > 55) {
		            $TX="<a href='Javascript:;'  class='userData' data-toggle='modal' data-target='#myModal500' ><img width='80px' height='80px' src='"+obj.head_img+"' alt='无头像'/>" +
		                "<small style='display: none'>b"+obj.boy_id+"</small></a>";
		            return $TX;
		            }else{
		            	$TXtext = "<a href='Javascript:;'  class='userData' data-toggle='modal' data-target='#myModal500' >无头像 <small style='display: none'>b"+obj.boy_id+"</small></a>";
		        		return $TXtext
		        	}
		          },
				 bSortable: false
		        },
		         {
				 	data : function(obj){
				 	$sdd = "<button	class='btn btn-default' class='operation' style='font-size:12px;'>操作<span style='display:none'>"+obj.boy_id+"</span></button>";
				 	
				 	return $sdd
				     },
				    bSortable: false
				 }
		        
		        
		       
		    ];
    Data_table("#tablevalue",ssv.typem,nichen_show1,false);
    
      
    $("#tablevalue").ajaxComplete(function(){ 
    	var trlen = $("tr").length;
    	for (var i=0;i<trlen;i++) {
    		$("tr").eq(i).find("td").on('tap',function(index,item){
    			var ss= index;
    			var yy = JSON.parse(ss);
    			console.log(yy)
    		})
    	}
//      var onopera = document.getElementsByClassName("operation");
//        mui.each(onopera,function(index){
//        	onopera[index].addEventListener('tap',function(){
//        		alert("sdf")
//      	var picker = new mui.PopPicker();
//				picker.setData([{
//					value: "1",
//					text: "通过"
//				}, {
//					value: "4",
//					text: "不通过"
//				}]);
//				picker.pickers[0].setSelectedIndex(1, 1000); //默认选中第二个选项
//						picker.show(function(SelectedItem) {
//			$("#user-status").text(SelectedItem[0].text)
////			console.log(SelectedItem[0].value);
//			var sp = {
//				boy_id: ssv.name,
//				show_status: SelectedItem[0].value
//			}
//			var	setstaut = JSON.stringify(sp,null,4);
//			console.log(setstaut)
//			})
//		
//     });
//     
//        })
          })
		
		
		
		
		
		
		
		
		
function Data_table(obj, url, Nv_columns,search,data,leng) {

    var car_table;
    car_table=$(obj).DataTable();
    car_table.destroy();
    $(obj).DataTable({
        "ajax": {
            type: "POST",
            "url": url,
            "data":  data
        },
        searching : search,
        "processing": true,
        "bServerSide": true,
        //"bDestroy": true,//不加这个在第二次展示此表格时报错
        "bJQueryUI": true,
        "sPaginationType": "full_numbers",//显示数字的翻页样式
        "bStateSave": false,//状态保存，使用了翻页或者改变了每页显示数据数量，会保存在cookie中，下回访问时会显示上一次关闭页面时的内容。
        //"bPaginate": true, //翻页功能
         pageLength: leng,
       
        "filter": false,
        //"destroy": true,
        //"order": [[ 0, "desc" ]], //按第一列降序排序
        bLengthChange: false,//不显示条数
        columns: Nv_columns,
        'language': {
            "sProcessing": "处理中...",
            "sLengthMenu": "显示 _MENU_ 项结果",
            "sZeroRecords": "抱歉， 没有找到",
            "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
            "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
            "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
            "sInfoPostFix": "",
            "sSearch": "搜索:",
            "sUrl": "",
            "sEmptyTable": "表中数据为空",
            "sLoadingRecords": "载入中...",
            "sInfoThousands": ",",
            "oPaginate": {
                "sFirst": "首页",
                "sPrevious": "上页",
                "sNext": "下页",
                "sLast": "末页"
            },
            "oAria": {
                "sSortAscending": ": 以升序排列此列",
                "sSortDescending": ": 以降序排列此列"
            }
        }
//      "initComplete": dbsurch
    });

}
		})
	</script>
</html>